home *** CD-ROM | disk | FTP | other *** search
- Ok I looked thru the Ref. Manual and I found this interesting little
- hack. I say hack because I'm sure it's probably not a good idea to do
- stuff like this, but hey, taking over the system isn't very nice either
- :). Anyway, use this at your own risk. All it does is check the bit in
- PRB to see whether the disk motor is on or not. It SAYS in the manual
- that this bit also tells you whether the drive light is on or off, so it
- should work. I dunno ... all I can say is try it on a blank floppy
- before you use it on DH0: .. here it is:
-
- ; (hopefully) waits until disk activity
- ; is done after startup and allows the program to continue (to avoid
- ; messing up the disk when taking over the system).
-
- CIA_B_PRB equ $bfd100 ; Peripheral Data Reg. Port B
-
- WaitForDiskActivityToFinish:
-
- move.b CIA_B_PRB,d0
- and.b #%10000000,d0 ; check the 8th bit
- cmp.b #0,d0 ; if it's equal to 0, then...
- beq.s WaitForDiskActivityToFinish ; the motor is on, so loop...
-
-
-
-
-
- William Nolan (wn22@cmu.edu)
-
-
-